/*
 * Fire.c
 *
 *  Created on: Jun 1, 2021
 *      Author: Rupert
 */

#include "Fire.h"

#include "FireSensor.h"
#include "stdint.h"

const float vol_ref[] = {
		0.6321,
		0.9966,
		1.2680,
		1.4705,
		1.6088,
		1.7277,
		1.8224,
		1.9020,
		1.9634,
		2.0205
};

float ConvertToResistance(float voltage)
{
	// 电压-阻值转换实现
	return 0;
}

float getResistance(void)
{
	float voltage = 0;
	for (uint8_t i = 0; i < 3; i++)
	{
		voltage += getADCValue();
	}
	voltage /= 3;
	return ConvertToResistance(voltage);
}
